<template>
  <div class="activity">
    <div class="row-fluid top-cats">
      <section class="widget">
        <router-link
          to="/activity"
          tag="div"
          class="page-header"
          style="position:relative;cursor:pointer"
        >
          <h3>校内活动</h3>
          <h4 style="position: absolute;right: 10px;top: 4px;">更多></h4>
        </router-link>
        <ul class="articles">
          <li class="article-entry standard" v-for="(activity,id) in tableData" :key="id">
            <h4>
              <router-link
                :to="'/activitycontent/'+activity.activity_id"
              >{{activity.activity_title}}
              </router-link>
            </h4>
            <span class="article-meta">
                <a class="iconfont">&#xe619;</a>
                {{activity.createtime|dataFormat}}
                <a
                  class="iconfont"
                  style="margin-left:50px"
                >&#xe609;</a>
                {{activity.activity_locale}}
              </span>
            <span class="like-count">
                <a class="iconfont" style="color:red">&#xe647;</a>
                {{activity.activity_read_num}}
              </span>
          </li>
        </ul>
      </section>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      smallttle: '',
      pagelistquery: {
        lable: '',
        total: 0,
        pagesize: 5,
        page: 1
      },
      tableData: {}
    }
  },
  methods: {
    async getActivityList () {
      const result = await this.$axios.post('/web/getactivitylist', this.qs.stringify(this.pagelistquery))
      if (result.data.state.type === 'SUCCESS') {
        this.tableData = result.data.data
        this.pagelistquery.total = result.data.count
      }
    }
  },
  created () {
    this.getActivityList()
  }
}
</script>

<style scoped>
</style>
